package com.slz3.business.module.configManagement.conShareManage.steward;

import com.slz3.business.module.configManagement.conShareManage.domain.ConShareManage;
import com.slz3.business.module.configManagement.conShareManage.domain.ConShareManageCondition;
import org.springframework.stereotype.Component;
import org.springframework.web.reactive.function.server.ServerRequest;
import org.springframework.web.reactive.function.server.ServerResponse;
import reactor.core.publisher.Mono;

import javax.annotation.Resource;

@Component
public class ConShareManageResponse {
    @Resource
    private ConShareManageResController conShareManageResController;

    public  Mono<ServerResponse> add(ServerRequest req) {
        return req.bodyToMono(ConShareManage.class).flatMap(conShareManage ->
                conShareManageResController.add(req, conShareManage)
        );
    }

    public  Mono<ServerResponse> delete(ServerRequest req) {
        return req.bodyToMono(ConShareManageCondition.class).flatMap(conShareManageCondition ->
                conShareManageResController.delete(req, conShareManageCondition)
        );
    }

    public  Mono<ServerResponse> modify(ServerRequest req) {
        return req.bodyToMono(ConShareManage.class).flatMap(conShareManage ->
                conShareManageResController.modify(req, conShareManage)
        );
    }


    public  Mono<ServerResponse> list(ServerRequest req) {
        return conShareManageResController.list(req);
    }

    public  Mono<ServerResponse> info(ServerRequest req) {
        return conShareManageResController.info(req);
    }

    public  Mono<ServerResponse> choice(ServerRequest req) {
        return conShareManageResController.choice(req);
    }

    public  Mono<ServerResponse> auditSubmit(ServerRequest req) {
        return req.bodyToMono(ConShareManageCondition.class).flatMap(conShareManageCondition ->
                conShareManageResController.auditSubmit(req, conShareManageCondition)
        );
    }

    public  Mono<ServerResponse> audit(ServerRequest req) {
        return req.bodyToMono(ConShareManageCondition.class).flatMap(conShareManageCondition ->
                conShareManageResController.audit(req, conShareManageCondition)
        );
    }

    public  Mono<ServerResponse> auditReject(ServerRequest req) {
        return req.bodyToMono(ConShareManageCondition.class).flatMap(conShareManageCondition ->
                conShareManageResController.auditReject(req, conShareManageCondition)
        );
    }

    public  Mono<ServerResponse> usingEnable(ServerRequest req) {
        return req.bodyToMono(ConShareManageCondition.class).flatMap(conShareManageCondition ->
                conShareManageResController.usingEnable(req, conShareManageCondition)
        );
    }

    public  Mono<ServerResponse> usingDisable(ServerRequest req) {
        return req.bodyToMono(ConShareManageCondition.class).flatMap(conShareManageCondition ->
                conShareManageResController.usingDisable(req, conShareManageCondition)
        );
    }   

}
